package com.yangl.corejava.pattern.abstractfactory;

public abstract class AbstractHumanFactory implements HumanFactory {

	protected Human createHuman(HumanEnum humanEnum){
		Human human=null;
		try {
			if(!humanEnum.toString().equals("")){
				human=(Human)Class.forName(humanEnum.toString()).newInstance();
			}
		} catch (Exception e) {
			// TODO: handle exception
		}
		return human;
	}
}
